import { Module } from "@nestjs/common";
import { PassportModule } from "@nestjs/passport";
import { JwtModule } from "@nestjs/jwt";
import { AuthService } from "./auth.service";
import { JwtStrategy} from "./jwt.strategy";
import { AuthController } from "./auth.controller";
import { UserModule } from "../user/user.module";
import { AuthProvider } from "./auth.provider";

@Module({
    imports:[
        UserModule,
        PassportModule.register({defaultStrategy:'jwt'}),
        JwtModule.register({
            secret:'gbblovetrf',
            signOptions:{expiresIn: 3600}
        }),
    ],
    controllers:[AuthController],
    providers:[
        ...AuthProvider,JwtStrategy,AuthService
    ]
})
export class AuthModule{}